package com.parenting.sevice.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.parenting.mapper.GoldMapper;
import com.parenting.entities.Gold;
import com.parenting.request.GoldRequest;
import com.parenting.response.GoldAdminResponse;
import com.parenting.sevice.GoldService;
import com.parenting.util.base.Result;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 我的金币记录 服务实现类
 * </p>
 *
 * @author zcj
 * @since 2021-05-11
 */
@Service
public class GoldServiceImpl extends ServiceImpl<GoldMapper, Gold> implements GoldService {
    
    @Override
    public Result<Page<GoldAdminResponse>> pageList(GoldRequest request) {
        Page<GoldAdminResponse> page = new Page<>(request.getCurrent(), request.getSize());
        Page<GoldAdminResponse> pageList = baseMapper.pageList(page, request);
        return Result.buildSuccess(pageList);
    }
}
